//Readchar mecare
Readchar.Plugins = {
    pageHTML5Scroll: function (option) {
        //alert(option);
        var defaultOption = {
            pageIdList: [],
            pageClass: ".",
            pageContainerClass: ".",
            allPageConClass: ".",
            duration: option.duration ? option.duration : 1000,
            headerClass: option.headerClass ? option.headerClass : ".",
            footerClass: option.footerClass ? option.footerClass : "."
        }
        var aPageList = option.pageIdList ? option.pageIdList : defaultOption.pageIdList,
			sPageClass = option.pageClass ? option.pageClass : defaultOption.pageClass,
			sPageContainerClass = option.pageContainerClass ? option.pageContainerClass : defaultOption.pageContainerClass,
			sAllPageConClass = option.allPageConClass ? option.allPageConClass : defaultOption.allPageConClass,
			currentIn = 0,
			currentOut = 0,
			currentPageNine = 0,
			currentURL = window.location.href,
			index = currentURL.indexOf("#") != -1 ? currentURL.indexOf("#") : currentURL.length,
			timeout = null,
			mElm_Title = $(".here-title"),
			mElm_Mp = $(".here-mp3"),
			mElm_Mp_Z = $(".mp-zn"),
			pageThTime = null,
			sixTimer = null,
			sixIndex = 1,
			hiIndex = 0;

        function initPage() {
            initMecarePage();
            //currentURL = window.location.href = currentURL.substring(0, index) + aPageList[0];
            //pageScroll();
            //return false;
            pageOneUp();
            Readchar.Event.buildWheel(pageScroll);
            $(".r-navi-icon").bind({
                click: function () {
                    var naviIndex = $(".r-navi-icon").index($(this));
                    naviIndex++;
                    currentURL = window.location.href = currentURL.substring(0, index) + aPageList[naviIndex];
                    pageScroll();
                }
            });
            $(".pn-list > a").click(function () {
                var naIndex = $(".pn-list > a").index($(this));
                if ((naIndex + 1) % 9 == 1) {
                    //alert('1');
                    currentURL = window.location.href = currentURL.substring(0, index) + aPageList[1];
                    pageScroll();
                    return false;
                }
                if ((naIndex + 1) % 9 == 2) {
                    currentURL = window.location.href = currentURL.substring(0, index) + aPageList[2];
                    pageScroll();
                    return false;
                }
                if ((naIndex + 1) % 9 == 3) {
                    currentURL = window.location.href = currentURL.substring(0, index) + aPageList[3];
                    pageScroll();
                    return false;
                }
                if ((naIndex + 1) % 9 == 4) {
                    currentURL = window.location.href = currentURL.substring(0, index) + aPageList[7];
                    pageScroll();
                    return false;
                }
                if ((naIndex + 1) % 9 == 5) {
                    currentURL = window.location.href = currentURL.substring(0, index) + aPageList[9];
                    pageScroll();
                    return false;
                }
                if ((naIndex + 1) % 8 == 6) {
                    currentURL = window.location.href = currentURL.substring(0, index) + aPageList[10];
                    pageScroll();
                    return false;
                }
                if ((naIndex + 1) % 8 == 7) {
                    currentURL = window.location.href = currentURL.substring(0, index) + aPageList[11];
                    pageScroll();
                    return false;
                }
            });
            $("#toolbar").click(function () {
                currentURL = window.location.href = currentURL.substring(0, index) + aPageList[0];
                pageScroll();
                return false;
            })
            var mpTime = null,
				actionIcon = 0;
            mpTime = setInterval(function () {
                mElm_Mp_Z.removeClass("mp-show");
                actionIcon++;
                mElm_Mp_Z.eq(actionIcon).addClass("mp-show");
                if (actionIcon == mElm_Mp_Z.length - 3) {
                    mElm_Mp_Z.eq(mElm_Mp_Z.length - 1).animate({
                        "opacity": "1"
                    }, 800);
                    clearInterval(mpTime);
                }
            }, 100);
            $(".mp-zy").delay(700).animate({
                "opacity": "1"
            }, 1200);
            mElm_Mp.removeClass("he-m-stop");
            $(".here-movie").animate({
                "opacity": "1"
            }, 1000);
            $(".mecare-page-container").css({
                "transition": "all cubic-bezier(.86, 0, .07, 1) .9s",
                "-webkit-transition": "all cubic-bezier(.86, 0, .07, 1) .9s",
                "-moz-transition": "all cubic-bezier(.86, 0, .07, 1) .9s",
                "-o-transition": "all cubic-bezier(.86, 0, .07, 1) .9s"
            });
            $(".he-icc").hover(function () {
                $(".he-icc").removeClass("he-icc-action");
                $(".he-05-icon >ul >li").removeClass("he-hover-bgn");
                $(this).addClass("he-icc-action");
                $(this).parent().addClass("he-hover-bgn");
            })
        }

        function initMecarePage() {
            $(sPageClass).height(Readchar.Style.getFullPageSize().height);
            mElm_Title.removeClass("tit-stop");
        }

        function pageEightAnimate() {
            $(".hf-page").stop().animate({
                "opacity": "0"
            }, 800, function () {
                $(".hf-page").eq(hiIndex).stop().animate({
                    "opacity": "1"
                }, 400);
            });
            liIndex = hiIndex + 1;
            for (var i = 1; i <= 5; i++) {
                if ($(".he-08-icon ul li").eq(i - 1).hasClass("hel-ac-0" + i)) {
                    $(".he-08-icon ul li").eq(i - 1).removeClass("hel-ac-0" + i);
                }
            }
            $(".he-08-icon ul li").eq(hiIndex).addClass("hel-ac-0" + liIndex);
        }

        //		function cupLastLay() {
        //			if (currentPageNine == 0) {
        //				chageNavBg(1);
        //			}
        //			$(".cup-09>ul>li").removeClass("cup-09-01");
        //			$(".cup-09>ul>li").eq(currentPageNine).addClass("cup-09-01");
        //			$(".m-page").stop().animate({
        //				"opacity": 0
        //			}, 800);
        //			$(".m-page").eq(currentPageNine).stop().animate({
        //				"opacity": 1
        //			}, 800);
        //		}


        function pageOneDown() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(0).addClass("fl-top-index");
            //			$(".navi-fixed").stop().animate({
            //				"top": "0",
            //				"opacity": 1
            //			}, 800);
            $(".navi-fixed").css("top", "0");
            //alert('11');
            chageNavBg(1);
            window.location.href = currentURL.substring(0, index) + aPageList[1];
            $(sAllPageConClass).css({
                "transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)",
                "-webkit-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)",
                "-moz-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)",
                "-o-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)"
            });
        }

        function pageTwoDown() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(1).addClass("fl-top-index");
            pageUpScoll();
            //			$(".he-05-tit").removeClass("opacit-stop");
            $(".cup-02").removeClass("cup-stop");
            $(".cup-022").removeClass("cup-stop");
            $(".cup-02-icon").removeClass("opacit-stop");
            $(".cup-02-icon2").removeClass("opacit-stop");
            $(".cuptime-02-04").removeClass("opacit-stop");

            setTimeout(function () {
                $(".he-icc").removeClass("he-icc-action");
                $(".he-icc").eq(0).addClass("he-icc-action");
                clearTimeout(this);
            }, 1000)
        }

        function pageThreeDown() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(2).addClass("fl-top-index");
            pageUpScoll();
            $(".m-03").removeClass("cup-stop");
            $(".m-033").removeClass("cup-stop");
            $(".m-03-icon").removeClass("opacit-stop");
            $(".m-03-icon2").removeClass("opacit-stop");
            $(".m-03-04").removeClass("opacit-stop");
        }

        function pageFourDown() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(2).addClass("fl-top-index");
            //			setTimeout(pageThereAnimate, 800);
            //			$(".he-02-title").removeClass("opacit-stop");
            $(".m-04").removeClass("cup-stop").removeClass("m-04-action");
            $(".m-04-04").removeClass("opacit-stop");
            $(".m-04-icon").removeClass("opacit-stop");
            pageUpScoll();
        }
        function pageFiveDown(direct) {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(2).addClass("fl-top-index");
            //			if (pageThIndex == 3 || direct != null) {
            //				pageUpScoll();
            //				$(".here-11-03").removeClass("here-11-stop");
            //				$(".here-11-01").removeClass("opacit-stop");
            //				$(".here-11-02").eq(1).removeClass("opacit-stop");
            //			} else {
            //				pageThIndex++;
            //				currentIn--;
            //				pageThereAnimate();
            //				setTimeout(function() {
            //					Readchar.Event.buildWheel(pageScroll)
            //				}, 300);
            //			}
            $(".m-05").removeClass("opacit-stop").removeClass("m-05-action");
            $(".m-055").removeClass("opacit-stop").removeClass("m-055-action");
            $(".m-05-03").removeClass("opacit-stop");
            $(".m-05-04").removeClass("opacit-stop");
            $(".m-05-icon1").removeClass("opacit-stop");
            $(".m-05-icon2").removeClass("opacit-stop");
            pageUpScoll();
        }

        function pageSixDown() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(2).addClass("fl-top-index");
            //			$(".here-12-01").removeClass("opacit-stop");
            //			$(".here-12").removeClass("here-12-stop");
            $(".cup-06").removeClass("opacit-stop").removeClass("m-06-action");
            $(".cuptime-06-04").removeClass("opacit-stop");
            $(".cup-06-icon").removeClass("opacit-stop");
            pageUpScoll();
        }

        function pageSevenDown() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(3).addClass("fl-top-index");
            $(".cup-07").removeClass("opacit-stop").removeClass("m-07-action");
            //$(".he-06-tit").removeClass("opacit-stop");
            //$(".he-06-03").removeClass("opacit-stop");
            //$(".he-06-02").removeClass("he-06-tstop");
            pageUpScoll();
        }

        function pageEightDown() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(3).addClass("fl-top-index");
            var setOne = setTimeout(function () {
                $(".cuptime-08-01").removeClass("cup-03-action");
                clearTimeout(setOne);
            }, 900)
            var setOut = setTimeout(function () {
                $(".cuptime-08-01").addClass("cup-03-stop");
                clearTimeout(setOut);
            }, 1800);
            $(".cup-08-title").removeClass("opacit-stop");
            pageUpScoll();
        }

        function pageNineDown() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(4).addClass("fl-top-index");
            pageUpScoll();
        }
	
        function pageTenDown(direct) {
            //			if (currentPageNine == 0 && direct == null) {
            //				$(".pn-list > a").removeClass("fl-top-index");
            //				$(".pn-list > a").eq(6).addClass("fl-top-index");
            //				pageUpScoll();
            ////				currentPageNine++;
            ////				cupLastLay();
            //			} else {
            ////				$(".pn-list > a").removeClass("fl-top-index");
            ////				$(".pn-list > a").eq(4).addClass("fl-top-index");
            ////				pageUpScoll();
            //				currentIn--;
            //			}
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(5).addClass("fl-top-index");
            pageUpScoll();
        }

        function pageElevenDown() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(6).addClass("fl-top-index");
            pageUpScoll();
        }

        function pageTwelveDown() {
            $(sAllPageConClass).css({
                "transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)",
                "-webkit-transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)",
                "-moz-transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)",
                "-o-transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)"
            });
        }


        function pageOneUp() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(0).addClass("fl-top-index");
            //			$(".navi-fixed").stop().animate({
            //				"top": "60px"
            //			}, 800);
            $(".navi-fixed").css("top", "60px");
            //alert('1');
            window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
            $(sPageContainerClass).css({
                "transform": "translate3d(0,0%,0)",
                "-webkit-transform": "translate3d(0,0,0)",
                "-moz-transform": "translate3d(0,0,0)",
                "-o-transform": "translate3d(0,0,0)"
            });
            $(sAllPageConClass).css({
                "transform": "translate3d(0,0px,0)",
                "-webkit-transform": "translate3d(0,0px,0)",
                "-moz-transform": "translate3d(0,0px,0)",
                "-o-transform": "translate3d(0,0px,0)"
            });
        }

        function pageTwoUp() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(0).addClass("fl-top-index");
            $(".cup-02").addClass("cup-stop");
            $(".cup-022").addClass("cup-stop");
            $(".cuptime-02-04").addClass("opacit-stop");
            pageUpScoll()
        }

        function pageThreeUp(direct) {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(1).addClass("fl-top-index");
            pageUpScoll()
            $(".m-03").addClass("cup-stop");
            $(".m-033").addClass("cup-stop");
            $(".m-03-04").addClass("opacit-stop");
        }
		
        function pageFourUp(direct) {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(2).addClass("fl-top-index");
            //			if (pageThIndex == 0 || direct != null) {
            //				pageUpScoll();
            //			} else {
            //				pageThIndex--;
            //				currentIn++;
            //				pageThereAnimate();
            //				setTimeout(function() {
            //					Readchar.Event.buildWheel(pageScroll)
            //				}, 300);
            //			}
            $(".m-04").addClass("cup-stop").addClass("m-04-action");
            $(".m-04-04").addClass("opacit-stop");
            pageUpScoll();

        }

        function pageFiveUp() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(2).addClass("fl-top-index");
            $(".m-05").addClass("opacit-stop").addClass("m-05-action");
            $(".m-055").addClass("opacit-stop").addClass("m-055-action");
            $(".m-05-03").addClass("opacit-stop");
            $(".m-05-04").addClass("opacit-stop");
            pageUpScoll()
        }

        function pageSixUp() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(2).addClass("fl-top-index");
            $(".cup-06").addClass("opacit-stop").addClass("m-06-action");
            $(".cuptime-06-04").addClass("opacit-stop");
            pageUpScoll()
        }

        function pageSevenUp() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(2).addClass("fl-top-index");
            $(".cup-07").addClass("opacit-stop").addClass("m-07-action");

            pageUpScoll()
        }

        function pageEightUp() {
            //			if (hiIndex == 0 || direct != null) {
            //				pageUpScoll();
            //			} else {
            //				hiIndex--;
            //				currentIn++;
            //				pageEightAnimate();
            //			}
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(3).addClass("fl-top-index");
            var setOne = setTimeout(function () {
                $(".cuptime-08-01").addClass("cup-03-action");
                clearTimeout(setOne);
            }, 900)
            var setOut = setTimeout(function () {
                $(".cuptime-08-01").removeClass("cup-03-stop");
                clearTimeout(setOut);
            }, 1800);
            $(".cup-08-title").addClass("opacit-stop");
            pageUpScoll()

        }

        function pageNineUp(direct) {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(3).addClass("fl-top-index");
            if (currentPageNine != 0 && direct == null) {
                //				currentPageNine--;
                //				cupLastLay();
                currentIn++;
            } else {
                pageUpScoll()
            }
            chageNavBg(1);
        }

        function pageTenUp() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(4).addClass("fl-top-index");
            pageUpScoll();
        }

        function pageElevenUp() {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(5).addClass("fl-top-index");
            pageUpScoll();
        }

        function pageTwelveUp(direct) {
            window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
            $(sAllPageConClass).css({
                "transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)",
                "-webkit-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)",
                "-moz-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)",
                "-o-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)"
            });
        }

        function pageUpScoll(direct) {
            window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
            $(sPageContainerClass).css({
                "transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)",
                "-webkit-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)",
                "-moz-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)",
                "-o-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)"
            });
        }

        function pageScroll() {
            if (timeout) {
                clearTimeout(timeout);
            }
            Readchar.Event.unBuildWheel(pageScroll);
            var direct = Readchar.Event.getWheelDelta(Readchar.Event.getEvent());
            if (isNaN(direct)) {
                direct = 0;
            }
            if (direct < 0) {
                var sPageId = window.location.href.substring(index);
                if (currentIn != aPageList.length - 1) {
                    currentIn++;
                } else {
                    currentIn = aPageList.length - 1;
                }
                if (currentIn == 1) {
                    pageOneDown();
                }
                if (currentIn == 2) {
                    pageTwoDown();
                }
                if (currentIn == 3) {
                    pageThreeDown();
                }
                if (currentIn == 4) {
                    pageFourDown()
                }
                if (currentIn == 5) {
                    pageFiveDown()
                }
                if (currentIn == 6) {
                    pageSixDown()
                }
                if (currentIn == 7) {
                    pageSevenDown();
                }
                if (currentIn == 8) {
                    pageEightDown()
                }
                if (currentIn == 9) {
                    pageNineDown()
                }
                if (currentIn == 10) {
                    pageTenDown()
                }
                if (currentIn == 11) {
                    pageElevenDown()
                }
                if (currentIn == 12) {
                    pageTwelveDown()
                }
                currentOut = currentIn;
            }
            if (direct > 0) {
                var sPageId = window.location.href.substring(index);
                if (currentIn != 0) {
                    currentIn--;
                } else {
                    currentIn = 0;
                }
                if (currentIn == 0) {
                    pageOneUp();
                }
                if (currentIn == 1) {
                    pageTwoUp();
                }
                if (currentIn == 2) {
                    pageThreeUp();
                }
                if (currentIn == 3) {
                    pageFourUp();
                }
                if (currentIn == 4) {
                    pageFiveUp()
                }
                if (currentIn == 5) {
                    pageSixUp()
                }
                if (currentIn == 6) {
                    pageSevenUp()
                }
                if (currentIn == 7) {
                    pageEightUp();
                }
                if (currentIn == 8) {
                    pageNineUp();
                }
                if (currentIn == 9) {
                    pageTenUp();
                }
                if (currentIn == 10) {
                    pageElevenUp()
                }
                if (currentIn == 11) {
                    pageTwelveUp()
                }
                currentOut = currentIn;
            }
            if (direct == 0) {
                var sPageId = window.location.href.substring(0, index);
                var pageStr = currentURL.substring(index);
                for (var i = 0; i < aPageList.length; i++) {
                    if (aPageList[i] == pageStr) {
                        currentIn = i;
                    }
                }
                if (currentIn == 0) {
                    pageOneDown();
                }
                if (currentOut < currentIn) {
                    if (currentIn == 14) {
                        window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
                        $(sPageContainerClass).css({
                            "transform": "translate3d(0,-" + (currentIn - 2) + "00%,0)",
                            "-webkit-transform": "translate3d(0,-" + (currentIn - 2) + "00%,0)",
                            "-moz-transform": "translate3d(0,-" + (currentIn - 2) + "00%,0)",
                            "-o-transform": "translate3d(0,-" + (currentIn - 2) + "00%,0)"
                        });
                        window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
                        $(sPageContainerClass).css({
                            "transform": "translate3d(0,-" + (currentIn - 2) + "00%,0)",
                            "-webkit-transform": "translate3d(0,-" + (currentIn - 2) + "00%,0)",
                            "-moz-transform": "translate3d(0,-" + (currentIn - 2) + "00%,0)",
                            "-o-transform": "translate3d(0,-" + (currentIn - 2) + "00%,0)"
                        });
                        $(sAllPageConClass).css({
                            "transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)",
                            "-webkit-transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)",
                            "-moz-transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)",
                            "-o-transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)"
                        });
                    } else {
                        if (currentIn >= 1) {
                            pageOneDown();
                            if (currentIn >= 2) {
                                pageTwoDown();
                                if (currentIn >= 3) {
                                    pageThreeDown();
                                    if (currentIn >= 4) {
                                        pageFourDown();
                                        if (currentIn >= 5) {
                                            pageFiveDown(direct);
                                            if (currentIn >= 6) {
                                                pageSixDown();
                                                if (currentIn >= 7) {
                                                    pageSevenDown();
                                                    if (currentIn >= 8) {
                                                        pageEightDown();
                                                        if (currentIn >= 9) {
                                                            pageNineDown(direct);
                                                            if (currentIn >= 10) {
                                                                pageTenDown(direct);
                                                                if (currentIn >= 11) {
                                                                    pageElevenDown();
                                                                    if (currentIn >= 12) {
                                                                        pageTwelveDown();
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                if (currentOut > currentIn) {
                    if (currentIn + 1 <= 12) {
                        pageTwelveUp(direct);
                        if (currentIn + 1 <= 11) {
                            pageElevenUp();
                            if (currentIn + 1 <= 10) {
                                pageTenUp();
                                if (currentIn + 1 <= 9) {
                                    pageNineUp(direct);
                                    if (currentIn + 1 <= 8) {
                                        pageEightUp();
                                        if (currentIn + 1 <= 7) {
                                            pageSevenUp();
                                            if (currentIn + 1 <= 6) {
                                                pageSixUp();
                                                if (currentIn + 1 <= 5) {
                                                    pageFiveUp();
                                                    if (currentIn + 1 <= 4) {
                                                        pageFourUp(direct);
                                                        if (currentIn + 1 <= 3) {
                                                            pageThreeUp();
                                                            if (currentIn + 1 <= 2) {
                                                                pageTwoUp();
                                                                if (currentIn + 1 <= 1) {
                                                                    pageOneUp();
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                currentOut = currentIn
            }
            $(".r-navi-icon").removeClass("r-navi-action");
            if (currentIn == 0 || currentIn == 1) {
                $(".r-navi-icon").eq(0).addClass("r-navi-action");
            } else if (currentIn == 11 || currentIn == 12) {
                $(".r-navi-icon").eq(10).addClass("r-navi-action");
            } else {
                $(".r-navi-icon").eq(currentIn - 1).addClass("r-navi-action");
            }
            timeout = setTimeout(function () {
                Readchar.Event.buildWheel(pageScroll);
            }, defaultOption.duration);
            console.log(currentIn);
        }
        initPage();
    }
}

function chageNavBg(index) {
    if (index == 0) {
        $(".navi-bg").css({
            "opacity": 0.8
        });
        $(".navi-fixed").addClass("navi-f-chang");
    }
    if (index == 1) {
        $(".navi-bg").css({
            "opacity": 0.05
        });
        $(".navi-fixed").removeClass("navi-f-chang");
    }
}
var pageThIndex = 0;

function pageThereAnimate() {
    $(".he-02-icon >ul >li").removeClass("he-02-action");
    $(".he-02-icon >ul >li").eq(pageThIndex).addClass("he-02-action");
    $(".he-021").stop().animate({
        "opacity": "0"
    }, 400, function () {
        $(".he-021").removeClass("he-021-action");
        $(".he-021").eq(pageThIndex).addClass("he-021-action");
        $(".he-021").eq(pageThIndex).stop().animate({
            "opacity": "1"
        }, 400);
    });
}
$(document).ready(function (e) {
    //var aPageList = option.pageIdList ? option.pageIdList : defaultOption.pageIdList;
    /*	var currentURL = window.location.href;
        currentURL +='#header';
        alert(currentURL);
        window.location.href= currentURL;*/
    //alert(currentURL);
    //alert(aPageList);
    //currentURL = window.location.href = currentURL.substring(0, index) + aPageList[0];
    //pageScroll();
    //第一屏开始
    $(".cup-02").addClass("cup-stop");
    $(".cup-022").addClass("cup-stop");
    $(".cuptime-02-04").addClass("opacit-stop");
    //第二屏开始
    $(".m-03").addClass("cup-stop");
    $(".m-033").addClass("cup-stop");
    $(".m-03-04").addClass("opacit-stop");
    //第三屏开始
    $(".m-04").addClass("cup-stop").addClass("m-04-action");
    $(".m-04-04").addClass("opacit-stop");
    //第四屏开始
    $(".m-05").addClass("opacit-stop").addClass("m-05-action");
    $(".m-055").addClass("opacit-stop").addClass("m-055-action");
    $(".m-05-03").addClass("opacit-stop");
    $(".m-05-04").addClass("opacit-stop");
    //第五屏开始
    $(".cup-06").addClass("opacit-stop").addClass("m-06-action");
    $(".cuptime-06-04").addClass("opacit-stop");

    //第七屏开始
    $(".lem-05-hover >img").bind({
        mouseover: function () {
            var index = $(".lem-05-hover >img").index($(this));
            Readchar.Event.stopPropagation(Readchar.Event.getEvent());
            switch (index) {
                case 0:
                    $(".cup-line").eq(1).stop().animate({
                        "width": "30px"
                    }, 500, function () {
                        $(".cup-line").eq(2).stop().animate({
                            "width": "150px"
                        }, 400, function () {
                            $(".cup-03-img").eq(0).removeClass("opacit-stop");
                        })
                    })

                    break;
                case 1:
                    $(".cup-line").eq(0).stop(0).animate({
                        "width": "170px"
                    }, 900, function () {
                        $(".cup-03-img").eq(3).removeClass("opacit-stop");
                    });
                    break;
                case 2:
                    $(".cup-line").eq(4).stop(0).animate({
                        "width": "150px"
                    }, 900, function () {
                        $(".cup-03-img").eq(2).removeClass("opacit-stop");
                    });

                    //					$(".cup-line").eq(3).stop().animate({
                    //						"width": "270px"
                    //					}, 800, function() {
                    //						$(".cup-line").eq(4).stop().animate({
                    //							"width": "50px"
                    //						}, 100, function() {
                    //							$(".cup-03-img").eq(2).removeClass("opacit-stop");
                    //						})
                    //					})
                    break;
                case 3:
                    $(".cup-line").eq(6).stop().animate({
                        "width": "40px"
                    }, 400, function () {
                        $(".cup-line").eq(7).stop().animate({
                            "width": "80px"
                        }, 500, function () {
                            $(".cup-03-img").eq(1).removeClass("opacit-stop");
                        })
                    })
                    break;
            }
        },
        mouseout: function () {
            var index = $(".lem-05-hover >img").index($(this));
            Readchar.Event.stopPropagation(Readchar.Event.getEvent());
            switch (index) {
                case 0:
                    $(".cup-03-img").eq(0).addClass("opacit-stop");
                    $(".cup-line").eq(2).stop().animate({
                        "width": "0"
                    }, 400, function () {
                        $(".cup-line").eq(1).stop().animate({
                            "width": "0"
                        }, 500)
                    })

                    break;
                case 1:
                    $(".cup-03-img").eq(3).addClass("opacit-stop");
                    $(".cup-line").eq(0).stop(0).animate({
                        "width": "0"
                    }, 700);
                    break;
                case 2:
                    $(".cup-03-img").eq(2).addClass("opacit-stop");
                    $(".cup-line").eq(4).stop(0).animate({
                        "width": "0"
                    }, 700);

                    //					$(".cup-03-img").eq(2).addClass("opacit-stop");
                    //					$(".cup-line").eq(4).stop().animate({
                    //						"width": "0"
                    //					}, 100, function() {
                    //						$(".cup-line").eq(3).stop().animate({
                    //							"width": "0"
                    //						}, 800)
                    //					})
                    break;
                case 3:
                    $(".cup-03-img").eq(1).addClass("opacit-stop");
                    $(".cup-line").eq(7).stop().animate({
                        "width": "0"
                    }, 500, function () {
                        $(".cup-line").eq(6).stop().animate({
                            "width": "0"
                        }, 400)
                    })
                    break;
            }
        }
    })
    //第七屏结束

    $(".r-navi-icon").hover(function () {
        var navIndex = $(".r-navi-icon").index($(this));
        $(this).addClass("r-n-hover");
        $(".r-nav-hidden").eq(navIndex).stop().animate({
            "width": 155,
            "opacity": 1
        }, 500);
    }, function () {
        var navIndex = $(".r-navi-icon").index($(this));
        $(this).removeClass("r-n-hover");
        $(".r-nav-hidden").eq(navIndex).stop().animate({
            "width": 0,
            "opacity": 0
        }, 500);
    })
    $(".he-02-icon >ul >li").click(function () {
        var heIndex = $(".he-02-icon >ul >li").index($(this));
        pageThIndex = heIndex;
        pageThereAnimate();
    });
    $(".he-02-left").click(function () {
        if (pageThIndex == 0) {
            pageThIndex = 3;
        } else {
            pageThIndex--;
        }
        pageThereAnimate();
    })
    $(".he-02-right").click(function () {
        if (pageThIndex == 3) {
            pageThIndex = 0;
        } else {
            pageThIndex++;
        }
        pageThereAnimate();
    });
    $(".he-08-icon ul li").bind({
        click: function () {
            hiIndex = $(".he-08-icon ul li").index($(this));
            pageEightAnimate();
        },
        mouseover: function () {
            var hiIndex = $(".he-08-icon ul li").index($(this));
            $(".he-icon-tex").eq(hiIndex).stop().animate({
                "opacity": "1"
            }, 300);
        },
        mouseout: function () {
            $(".he-icon-tex").stop().animate({
                "opacity": "0"
            }, 300);
        }
    });
    $(".here-041-01").hover(function () {
        $(".here-04-r2").addClass("tx-animate");
        $(".here-04-l03").animate({
            "width": "487px"
        }, 500, function () {
            $(".here-01-r1").addClass("tx-animate");
        });
    }, function () {
        $(".here-04-l03").animate({
            "width": "0"
        }, 300, function () {
            $(".here-04-r2").removeClass("tx-animate");
        });
        $(".here-01-r1").removeClass("tx-animate");
    })
    $(".here-042-01").hover(function () {
        $(".here-04-r3").addClass("tx-animate");
        $(".here-04-l02").animate({
            "width": "703px"
        }, 600, function () {
            $(".here-01-r1").addClass("tx-animate");
        });
    }, function () {
        $(".here-04-l02").animate({
            "width": "0"
        }, 600, function () {
            $(".here-04-r3").removeClass("tx-animate");
        });
        $(".here-01-r1").removeClass("tx-animate");
    })
    $(".here-043-01").hover(function () {
        $(".here-04-l01").animate({
            "width": "241px"
        }, 300, function () {
            $(".here-01-r1").addClass("tx-animate");
        });
        $(".here-04-r4").addClass("tx-animate");
    }, function () {
        $(".here-04-l01").animate({
            "width": "0"
        }, 300, function () {
            $(".here-04-r4").removeClass("tx-animate");
        });
        $(".here-01-r1").removeClass("tx-animate");
    })
    $(".here-051-btn").click(function () {
        var index = $(".here-051-btn").index($(this));
        $(".here-051-btn").removeClass("here-051-action");
        $(this).addClass("here-051-action");
        if (index == 1) {
            $(".here-05-a").stop().animate({
                "left": "-2880px"
            }, 500);
            $(".here-05-b").stop().animate({
                "left": "-960px"
            }, 500);
        }
        if (index == 0) {
            $(".here-05-a").stop().animate({
                "left": "-960px"
            }, 500);
            $(".here-05-b").stop().animate({
                "left": "960px"
            }, 500);
        }
    });
    $(".he-07-a").hover(function () {
        var index = $(".he-07-a").index($(this));
        $(".he-07-b").addClass("he-07-bstop");
        $(".he-07-b").eq(index).removeClass("he-07-bstop");
    }, function () {
        $(".he-07-b").addClass("he-07-bstop");
    });
});
var imgs = document.getElementsByTagName("img"),
	imgLength = imgs.length,
	sum = imgLength;
for (var i = 0; i < imgs.length; i++) {
    imgs[i].onload = loadFun;
}

function loadFun() {
    imgLength--;
    $(".lo-bar-bg").width((parseInt((sum - imgLength) / sum)) * 200);
}
window.onscroll = function () {
    if ($(document).scrollTop() > 500) {
        //		$(".navi-fixed").stop().animate({
        //			"top": "0",
        //			"opacity": "1"
        //		}, 800);
        $(".navi-fixed").css("top", "0");
        $(".navi-bg").css({
            "background": "#fff",
            "opacity": "0.2"
        });
    }
    if ($(document).scrollTop() <= 500) {
        //		$(".navi-fixed").stop().animate({
        //			"top": "-60px",
        //			"opacity": "1"
        //		}, 800);
        $(".navi-fixed").css("top", "60px");
    }
}
window.onload = function () {
    $(".he-081-02").css({
        "top": $(".mecare-page").height() - $(".he-081-02").height()
    });
    $(".loading").remove();
    if (window.Readchar.Browser.ie < 10) {
        //alert('2');
        $("body").css({
            "overflow-y": "scroll"
        });
        $(".here-title").removeClass("tit-stop");
        $(".right-navi").hide();
        $(".here-movie").removeClass("opacit-stop");
        $(".he-02-title").removeClass("opacit-stop");
        $(".he-021").eq(0).css("opacity", 1);
        $(".he-05-tit").removeClass("opacit-stop");
        $(".he-icc").css({
            "width": "325px",
            "opacity": "1"
        });
        $(".he-07-tit").removeClass("he-07-tstop");
        $(".he-07-02").removeClass("he-072-stop");
        $(".here-07-title").removeClass("here-07-stop");
        $(".he-02-img").css("top", "37%");
        $(".he-08-02").removeClass("he-082-stop");
        $(".he-06-tit").removeClass("opacit-stop");
        $(".he-06-03").removeClass("opacit-stop");
        $(".here-11-01").removeClass("opacit-stop");
        $(".here-11-03").removeClass("here-11-stop");
        $(".here-12-01").removeClass("opacit-stop");
        $(".here-14-01").removeClass("opacit-stop");
        $(".here-14-02").removeClass("here-142-stop").css("top", "47%");
        $(".here-14-03").removeClass("here-143-stop").css("top", "47%");
        $(".cup-09").hide();
        $(".he-06-02").css("top", "57%");
        $(".here-04-tit").removeClass("opacit-stop");
        $(".here-14-btn").removeClass("opacit-stop");
        $(".he-05-icon >ul li").addClass("he-hover-bgn");
        $(".here-04-r3").hide();
        $(".here-04-r2").hide();
        $(".here-04-r4").hide();
        $(".here-01-r1").hide();
        $(".he-28-01").removeClass("opacit-stop");
        $(".he-28-02").removeClass("opacit-stop");
    } else {
        $(".mecare-con").addClass("mecar-action");
        Readchar.Plugins.pageHTML5Scroll({
            pageIdList: ["#header", "#page-01-show", "#page-02-show", "#page-03-show", "#page-04-show", "#page-05-show", "#page-06-show", "#page-07-show", "#page-08-show", "#page-09-show", "#page-10-show", "#page-11-show"],
            pageClass: ".mecare-page",
            pageContainerClass: ".mecare-action",
            allPageConClass: ".mecare-page-container",
            duration: 1000,
            headerClass: ".mecare-header",
            footerClass: ".footer"
        });
    }
}
window.onresize = function () {
    $(".mecare-page").height(Readchar.Style.getFullPageSize().height);
    $(".he-081-02").css({
        "top": $(".mecare-page").height() - $(".he-081-02").height()
    })
}